A magnetic sensor may be used to determine a position of a movable object, connected to a magnet, based on a magnetic field produced by the magnet. For example, the magnetic sensor may be used to determine a linear position of the movable object, an angular position of the movable object, a position of the movable object on a two-dimensional plane, a position of the movable object in a three-dimensional space, or the like.